#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
int main()
{
    char str[5001];
    int n, nn;
    string all;
    cin >> n >> nn;
    gets(str);
    //gets_s(str,5001);
    char *word = strtok(str, " ");
    /* 继续获取其他的子字符串 */
    while (word != NULL)
    {
        int n = strlen(word);
        int mid;
        char *a = new char[n];
        if (n % 2 == 0)
        {
            mid = n / 2;
        }
        else
        {
            mid = n / 2 + 1;
        }
        for (int i = 0; i < mid; i++)
        {
            //cout<<(i+1)*2-1-1<<" ";
            a[(i + 1) * 2 - 1 - 1] = word[i];
        }
        int p = 2;
        for (int i = n - 1; i >= mid; i--)
        {
            //cout<<p-1<<" ";
            a[p - 1] = word[i];
            p += 2;
        }
        //cout<<a<<" ";
        a[n] = '\0';
        all += a;
        all += " ";
        delete a;
        word = strtok(NULL, " ");
    }
    cout << all;
    return 0;
}